fileformatsfandomcom-20200215-history
SubStation Alpha
SubStation Alpha (SSA) is a subtitling / script format that supports text formatting, animation, graphics and karaoke.SubStation Alpha - Multimedia Wiki It is also the name of the program that is able to read SSA files. Advanced SubStation Alpha (ASS) is a newer version of SSA (technically version 4+). File specification SSA and ASS files are plain DOS text files. ASS added Unicode support. ASS (SSA V4+) ASS is an improvement upon the SSA V4 specification. ASS files have INI-style sections: each section is preceded by a line containing the sections name, in square brackets. Aside from this, each line is generally composed of: a line descriptor, which tells about what the line is about; a colon; and the line data itself. Any whitespace between these parts are allowed. Blank lines are also allowed. Hard comment lines are preceded by either a semicolon or !: (with "!" as the line descriptor). Unrecognized and incorrect line formats are ignored. Fields on the line data are separated by a comma and, with the exception of the Text field, which should be the last field, must not contain any commas. Script Info section The Script Info section contains general information about the file. The following is a sample Script Info section: ASS file v4.00+ 0 848 480 yes Awesome 0 5 35483 Hatsune Miku Normal }} Descriptors Styles section The Styles section defines different preset styles that can be used to adjust the appearance of individual lines in the script. The actual name of the section depends on the file version, for ASS this is Styles. In the Events section, unrecognized styles are styled with the "Default" style. Unrecognized fonts are assigned to Arial - this may occur when the font is not installed in a target user's system. The following is a sample Styles section: Name Fontname Fontsize PrimaryColour SecondaryColour OutlineColour BackColour Bold Italic Underline StrikeOut ScaleX ScaleY Spacing Angle BorderStyle Outline Shadow Alignment MarginL MarginR MarginV Encoding Default Arial 28 &H00FFFFFF &H1EFFFFFF &H0048001C &H7F000000 -1 0 0 0 100 100 0 0 1 1.5 0.5 2 10 10 10 1 Descriptors ; Format : Defines the format of subsequent Style lines. This is provided for backward-compatibility. ; Style : Defines a style. The style is subsequently identified by its Name field. Fields Events section This section contains the different objects to be displayed on screen, each having its corresponding properties, including timing. The following are the fields available to ASS: The following are the Event section descriptors: Style overrides The ASS format has an extensive set of overrides that can be used to modify parts of or whole specific subtitles. All override codes except for \N, \n and \h must be enclosed in curly brackets ({}). Consecutive override codes may be placed inside a single pair of brackets. Override codes typically affect only the text succeeding it, but some codes modify the whole line. All override codes are preceded by a backslash (\) and may contain a parameter, if it must be provided. If an override code requires 2 or more parameters, these are placed inside parentheses and are comma-delimited. The following is a list of ASS override codes. File attachment Files can be attached to scripts and are stored as plain text. The method used is a form of UUEncoding. Data types ; Color :Color values are expressed in hexadecimal BGR format as &HBBGGRR& or ABGR (with alpha channel) as &HAABBGGRR&. Transparency (alpha) can be expressed as &HAA&. Note that in the alpha channel, 00 is opaque and FF is transparent. ; Boolean values (Styles section) : -1 is true, 0 is false. ; Alignment : Alignment values are based on the numeric keypad. 1 - bottom left, 2 - bottom center, 3 - bottom right, 4 - center left, 5 - center center, 6 - center right, 7 - top left, 8 - top center, 9 - top right. In addition to determining the position of the subtitle, this also determines the alignment of the text itself. ; Time : Time is expressed as h:mm:ss:xx (xx being hundredths of seconds). The hour can only be a single digit. SSA V1-4 : See the Multimedia Wiki link. References External links * SubStation Alpha - Multimedia Wiki * SSA 4 / ASS specification Category:Subtitle formats